<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html >
    <head>
        <meta charset="UTF-8">
        <title>欢迎页面</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="shortcut icon" type="image/x-icon" href="static/favicon.ico" />
        <link rel="stylesheet" href="static/css/font.css">
        <link rel="stylesheet" href="static/css/xadmin.css">
        <script type="text/javascript" src="static/lib/jquery/jquery.min.js"></script>
        <script src="static/lib/layui/layui.js"></script>
        <script src="static/lib/echarts/echarts.min.js"></script>
        <script type="text/javascript" src="static/js/xadmin.js"></script>
        <link rel="stylesheet" href="static/css/animate.min.css">
    </head>
    <body>
        <div class="x-body animated fadeIn">
            
            <fieldset class="layui-elem-field">
                <legend>主页</legend>
                <div class="layui-field-box">
                    <div id="main" style="wid 100%;height:400px;"></div>
                </div>
            </fieldset>
        </div>
        <script type="application/javascript">
            layui.use('element', function(){
                // 基于准备好的dom，初始化echarts实例
                var myChart = echarts.init(document.getElementById('main'));
                // 指定图表的配置项和数据
                option = {
                    title: {
                        text: '近七天登陆次数统计图',
                        left: 'center'
                    },
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: { // 坐标轴指示器，坐标轴触发有效
                            type: 'none' // 默认为直线，可选为：'line' | 'shadow'
                        }
                    },
                    xAxis: {
                        type: 'category',
                        data:  getWeekList()
                    },
                    yAxis: {
                        type: 'value'
                    },
                    series: [{
                        data: [],
                        type: 'line'
                    }]
                };
               /*  layui.$.get('/weekLoginCount', function (data) {
                    option.series[0].data = data;
                    // 使用刚指定的配置项和数据显示图表。
                    myChart.setOption(option);
                }); */
            });
        </script>
    </body>
</html>